home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 476-500 / disk_497 / request / request.doc < prev    next >
Text File  |  1992-05-06  |  3KB  |  94 lines

  1.  
  2.                                Request
  3.  
  4.                            by Stefan Sticht
  5.  
  6.                             PUBLIC DOMAIN
  7.  
  8.  
  9. IMPORTANT:   Request  requires  Kickstart  and Workbench 2.0 (at least
  10. Kickstart 37.*) !!
  11.  
  12.  
  13. Request  opens  an  EasyRequester  (AutoRequester)  with user text and
  14. gadgets.    Designed   for   use  in  script  files;  a  sophisticated
  15. replacement for ask
  16.  
  17. Usage: Request <text> [TITLE <title>] [GADGETS <gad1|gad2|gad3|...>]
  18.                [Screen <publicscreenname>]
  19.  
  20. <text>:
  21. Text to be displayed in the Requester. Default is no Text.
  22.  
  23. TITLE <title>:
  24. The title for the requester.
  25.  
  26. GADGETS:
  27. You may specify up to 20 gadgets.  Gadgets are seperated by a "|".  If
  28. no gadget is specified, an "OK" gadget will be used.
  29.  
  30. Screen <publicscreenname>:
  31. The name of the public screen, where the requester should open.  If no
  32. name  specified, the requester will open on the default public screen.
  33. If the specified screen can't be found, a code of 20 will be returned!
  34.  
  35. Which  gadget the user selected can be examined by the ReturnCode:  If
  36. you use the Workbench 2.0 Shell, look at the local varibale RC for the
  37. ReturnCode.   From ARexx you may examine the variable RC.  If you only
  38. specify  one  gadget,  the  returncode  therefore  will  be 0.  If you
  39. specify  more  than  one  gadget,  the  leftmost gadget will be 1, the
  40. rightmost  one  will  be  0.  The gadgets between will be 2, 3, 4 etc.
  41. Return codes of gadgets:
  42.  
  43.                       1 2 3 4 5 6 7 8 9 10 ... 0
  44.                       |                        |
  45.      leftmost gadget -+                        +- rightmost gadget
  46.  
  47.  
  48. Try out these examples:
  49.  
  50. Request "This is a test!" TITLE "Test:" GADGETS "O.K."
  51. Request "This shows you the return codes of the Gadgets:" GADGETS "RC=1|RC=2|RC=3|RC=0"
  52. Request "Multi*Nlines*Nshown*Nhere!" GADGETS "YES|NO"
  53. Request "This is a test on the CED screen!" SCREEN CygnusEdScreen1
  54.  
  55. ; --- CUT HERE ---
  56. ; Here's a script for testing Request
  57. Request "Do you like this requester?" TITLE "A question:" GADGETS "Yes|Dont' know|NO"
  58. Set ANSWER $RC
  59. Echo "Returncode was" $ANSWER
  60. If $ANSWER EQ 1
  61.     Echo "You like it!"
  62. EndIf
  63. If $ANSWER EQ 2
  64.     Echo "But you should know!"
  65. EndIf
  66. If $ANSWER EQ 0
  67.     Echo "Why not?"
  68. EndIf
  69. UnSet ANSWER
  70. ; --- CUT HERE ---
  71.  
  72.  
  73. Return codes:
  74.     40: Error in command line!
  75.     30: Can't open intuition.library V37 or higher
  76.     20: Named public screen can't be found!
  77.     anything under 20: The number of the gadget, the user pressed.
  78.  
  79.  
  80.  
  81.  
  82.  
  83. Send bug-reports, enhancement-requests, questions, gifts(!) to:
  84. ---------------------------------------------------------------
  85. Stefan Sticht
  86. Bibereckerweg 40a
  87. D-8390 Passau 18
  88. FRG
  89.  
  90. or (better) EMail to:
  91. Internet: cbmvax.commodore.com!cbmehq!cbmger!edith!sticht@rutgers.EDU
  92.       or: IWSTICHT@ibm.rz.uni-passau.de
  93. Fido-Net: Stefan Sticht (2:242/16:4)
  94.